package com.yupi.springbootinit.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yupi.springbootinit.model.dto.production.printingrecord.PrintingRecordAddRequest;
import com.yupi.springbootinit.model.dto.production.printingrecord.PrintingRecordQueryRequest;
import com.yupi.springbootinit.model.dto.production.printingrecord.PrintingRecordUpdateRequest;
import com.yupi.springbootinit.model.vo.production.PrintingRecordVO;

import java.util.Map;

/**
 * @Author:WwW
 * @Description
 * @Date: 2025/9/22  16:34
 */
public interface PrintingRecordService {
    Long addPrintingRecord(PrintingRecordAddRequest request);

    Boolean updatePrintingRecord(PrintingRecordUpdateRequest request);

    Boolean deletePrintingRecord(Long id);

    PrintingRecordVO getPrintingRecordVO(Long id);

    Page<PrintingRecordVO> listPrintingRecordByPage(PrintingRecordQueryRequest request);

    /**
     * 根据产品名称查询订单信息
     * @param productName 产品名称
     * @return 订单ID和订单编号
     */
    Map<String, Object> queryOrderByProductName(String productName);

    // 在 PrintingRecordService 接口中新增：

    /**
     * 根据流程卡号查询批次信息（用于自动填充产品名称、数量、材料牌号）
     *
     * @param flowNumber 流程卡号
     * @return 批次信息（包含产品列表）
     */
    Map<String, Object> queryByFlowNumber(String flowNumber);
}
